package com.itheima.c_memory;

/**
 * 目标：理解多个变量指向同一个数组
 */
public class Demo01 {

    public static void main(String[] args) {
        int[] arr1 = {11, 22, 33};
        int[] arr2 = arr1;

        System.out.println(arr1);   //地址值12345678
        System.out.println(arr2);   //地址值12345678

        arr2[1] = 99;
        System.out.println(arr1[1]);  //22? 99?--->99
        System.out.println(arr2[1]);  //22? 99?--->99

        arr2 = null;
        System.out.println(arr2);  //null
        //System.out.println(arr2[1]);
    }
}
